function getAddress(parentId,id){
	$("." + id).html("<option></option>");
	var parentId =parentId;
	$.getJSON("../address_query.json",{parentId : parentId},function(data){
    	if(data.success && data.address != null){
    		$.each(data.address,function(index,item){
    			var option = "<option value='"+item.id+"'>"+item.name+"</option>";
    			$("." + id).append(option);
    		});
    	}if(parentId===0){
			isLocalCity(false);
		}
    });
}
$(document).ready(function () {
	getAddress(0,"city_list");
    $(".city_list").change(function(){
    	getAddress(this.value,"area_list");
    	$(".area_list").change();
    });
    $(".area_list").change(function(){
    	getAddress(this.value,"street_list");
    	$(".street_list").change();
    });
});